import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {DemoComponent} from './demo.component';
import {HttpComponent} from './http/http.component';


@NgModule({
  imports: [
    BrowserModule,
    RouterModule.forChild([
      {
        path: '',
        component: DemoComponent,
        children: [
          {
            path: 'http',
            component: HttpComponent
          },
          {
            path: '',
            redirectTo: 'http',
            pathMatch: 'full'
          }
        ]
      },

    ])
  ],
  declarations: [HttpComponent, DemoComponent],
  providers: [],
  entryComponents: []
})
export class DemoModule {
}
